package com.xiao.train.business.controller;

import com.xiao.train.business.req.TrainStationQueryReq;
import com.xiao.train.business.service.TrainStationService;
import com.xiao.train.common.resp.CommonResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("train-station")
public class TrainStationController {

    @Autowired
    TrainStationService trainStationService;

    @GetMapping("query-list")
    public CommonResp queryList(@Valid TrainStationQueryReq req) {
        return new CommonResp(trainStationService.queryList(req));
    }
}